
var currtool = '';

var maptoolList = new Array(5);

function clearMaptool() {
	for (var i in getElement('maptool').getElementsByTagName('span') )	{
		if ( getElement('maptool').getElementsByTagName('span')[i].id != 'undefined' )	{
			getElement('maptool').getElementsByTagName('span')[i].className =
					getElement('maptool').getElementsByTagName('span')[i].id + 'out';
		} // end if
	} // end for
}

/* zoomin */
maptoolList[0] = [
	function() { clearMaptool(); obj = getElement('zoomin'); obj.className = (obj.className=='zoominout')?'zoominover':'zoominover'; currtool = obj; getElement('container').style.cursor = 'crosshair';},
	function() { if (currtool.id == 'zoomin' ) return false; getElement('zoomin').className = 'zoominover'; },
	function() { if (currtool.id == 'zoomin' ) return false; getElement('zoomin').className = 'zoominout'; }
];

/* zoomout */
maptoolList[1] = [
	function() { clearMaptool(); obj = getElement('zoomout'); obj.className = (obj.className=='zoominout')?'zoomoutover':'zoomoutover'; currtool = obj; getElement('container').style.cursor = 'crosshair'; },
	function() { if (currtool.id == 'zoomout' ) return false; getElement('zoomout').className = 'zoomoutover'; },
	function() { if (currtool.id == 'zoomout' ) return false; getElement('zoomout').className = 'zoomoutout'; }
];

/* pan  */
maptoolList[2] = [
	function() { clearMaptool(); obj = getElement('pan'); obj.className = (obj.className=='panout')?'panover':'panover'; currtool = obj; getElement('container').style.cursor = 'move'; },
	function() { if (currtool.id == 'pan' ) return false; getElement('pan').className = 'panover'; },
	function() { if (currtool.id == 'pan' ) return false; getElement('pan').className = 'panout'; }
];

/* full */
maptoolList[3] = [
	function() { obj = getElement('full'); obj.className = 'fullover'; initMapLoad(); },
	function() { if (currtool.id == 'full' ) return false; getElement('full').className = 'fullover'; },
	function() { if (currtool.id == 'full' ) return false; getElement('full').className = 'fullout'; }
];

/* dist  */
maptoolList[4] = [
	function() { clearMaptool(); obj = getElement('dist'); obj.className = (obj.className=='distout')?'distover':'distover'; currtool = obj; getElement('container').style.cursor = 'crosshair'; },
	function() { if (currtool.id == 'dist' ) return false; getElement('dist').className = 'distover'; },
	function() { if (currtool.id == 'dist' ) return false; getElement('dist').className = 'distout'; }
];

